int gong,mu,xiao;
for (gong = 0; gong <= 20; gong++) {
	  for (mu = 0; mu <= 33; mu++) {
	  	  for (xiao = 0; xiao <= 300; xiao++) {
		    	if (gong*5+mu*3+xiao/3==100 && gong+mu+xiao==100 && xiao%3==0) {
			    	System.out.println("公鸡"+gong+"只，母鸡"+mu+"只，小鸡"+xiao+"只。");
		  	  }
  		  }
	  }
}
